package org.achartengine.internal.model;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

/* loaded from: classes2.dex */
public class a implements Serializable {
    private static final long serialVersionUID = 1;
    private String a;
    private List<String> b = new ArrayList();
    private List<Double> c = new ArrayList();

    public a(String str) {
        this.a = str;
    }

    public String a() {
        return this.a;
    }

    public synchronized void a(double d) {
        a(this.b.size() + "", d);
    }

    public synchronized void a(String str, double d) {
        this.b.add(str);
        this.c.add(Double.valueOf(d));
    }

    public synchronized void a(int i, String str, double d) {
        this.b.set(i, str);
        this.c.set(i, Double.valueOf(d));
    }

    public synchronized void a(int i) {
        this.b.remove(i);
        this.c.remove(i);
    }

    public synchronized void b() {
        this.b.clear();
        this.c.clear();
    }

    public synchronized double b(int i) {
        return this.c.get(i).doubleValue();
    }

    public synchronized String c(int i) {
        return this.b.get(i);
    }

    public synchronized int c() {
        return this.b.size();
    }

    public h d() {
        h hVar = new h(this.a);
        int i = 0;
        for (Double d : this.c) {
            i++;
            hVar.a(i, d.doubleValue());
        }
        return hVar;
    }
}
